-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PositionStream to report correct position; add tests for reading files #2398
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2398 +/- ##
==========================================
+ Coverage 73.82% 73.83% +<.01%
==========================================
Files 484 484
Lines 245793 245799 +6
==========================================
+ Hits 181463 181484 +21
+ Misses 64330 64315 -15
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I have only minor nitpicks, but it's also fine to just ignore those.
src/streams.c
Outdated
|
||
Int ifid = INT_INTOBJ(fid); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you end up making other changes: perhaps remove second empty line? or even both empty lines, and then for symmetry change ret = ...
to Int ret = ...
, and remove the declaration of ret
above?
tst/teststandard/files/files.tst
Outdated
@@ -0,0 +1,104 @@ | |||
gap> START_TEST("files.tst"); | |||
gap> testRead := function(testName, openFunc, lines, hasPosition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so... testName
is only used for printing in error messages, presumably to identify the failing tests case? openFunc
opens a new stream, lines
contains the expected content of that stream, and hasPosition
indicates whether PositionStream
is supported. Correct?
Perhaps add this into a comment, and/or rename lines
to expectedLines
or expected
; and hasPosition
to supportsPositionStream
?
07daa50
to
ec5818c
Compare
Clarification for release notes: the bug in |
This fixes a bug in
PositionStream
, and also adds a big general test for reading of files, and positions in streams.